// math.h

// Copyright (C) 2010  traxex

// Author: 	traxex <traxex@yahoo.cn>
// Created: 	18 Apr 2010
// Version: 	1.0
#pragma once

#include <cmath>

typedef	unsigned char	uchar;
typedef	unsigned short	ushort;
typedef	unsigned int	uint;
typedef	unsigned long	ulong;

namespace traxex{

using std::acos;
using std::asin;
using std::atan;
using std::atan2;
using std::ceil;
using std::cos;
using std::cosh;
using std::exp;
using std::fabs;
using std::floor;
using std::fmod;
using std::frexp;
using std::ldexp;
using std::log;
using std::log10;
using std::modf;
using std::pow;
using std::sin;
using std::sinh;
using std::sqrt;
using std::tan;
using std::tanh;

namespace{
    const	float  fPI=(float)(M_PI);
    const	double PI=M_PI;
}

template<typename T> pure T sqre( const T &t){ return t*t;}
template<typename T> pure T sec ( const T &t){ return 1/cos(t);}
template<typename T> pure T csc ( const T &t){ return 1/sin(t);}

template<typename T> pure T max ( const T &a, const T &b){ return a>b?a:b;}
template<typename T> pure T min ( const T &a, const T &b){ return a<b?a:b;}

}

#include <traxex/point.h>
